home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Libris Britannia 4
/
science library(b).zip
/
science library(b)
/
PROGRAMM
/
CC_C
/
0574.ZIP
/
SPRINTF.ASM
< prev
next >
Wrap
Assembly Source File
|
1986-11-20
|
553b
|
43 lines
include compiler.inc
ttl SPRINTF, 1.05, 10-20-86 jwk
;formatted output to string
dseg
defptr strp ;saves string pointer
cseg
xtfs <_fmt>
procdef sprintf, <<sptr, ptr>, <arglst, word>>
pushreg
ldptr di, sptr
svptr di, strp
mov ax, offset pc ;pointer to function
lea dx, arglst ;pointer to first arg
callit _fmt, <<dx, preg, ss>, <ax, preg, cs>>
ldptr di, strp
xor al, al
stosb
pret
pend sprintf
statdef pc, <<chr, byte>>
pushreg
mov al, chr
pci strp
pret
iend pc
finish